public class demo9 {
    public static void main(String[] args) {
        computer c1=new computer();
        light l1=new light();
        light l2=new light();
        c1.usb1=l1;
        c1.usb2=l2;
        c1.powersupport();

    }
}
//第一个接口申明规范
interface USBinterface{
}
interface supportpower extends USBinterface{
  public void powersupport();
}
interface recivepower extends USBinterface{
 public void powerrecive();
}
class computer implements supportpower{
    public recivepower usb1;
    public recivepower usb2;
    public void powersupport(){
        System.out.println("电脑提供电量");
        usb1.powerrecive();
        usb2.powerrecive();
    }
}
class light implements recivepower{
    public void powerrecive(){
        System.out.println("电灯接收电量");
    }
}